/*
*
* PDFUI
*
* this class creates a button to activate pdf writing
*
*/
class PDFUI {
  
  // --------------------------------------
  // attributes
  // --------------------------------------
  ControlP5 controlP5;
  PApplet parent;
  int origX;
  int origY;
  int wid;
  int hei;
  Button pdfButton;
  
  // ---------------------------------------
  // constructor
  // ---------------------------------------
  PDFUI(ControlP5 cp5, PApplet p55, int x, int y, int w, int h) {
    
    // assign attributes
    controlP5 = cp5;
    parent = p55;
    origX = x;
    origY = y;
    wid = w;
    hei = h;
    
    // create button
    pdfButton = controlP5.addButton("Export pdf", 0, origX, origY, wid, hei);
    pdfButton.setId(2);
    pdfButton.hide();
    pdfButton.setColorBackground(color(175, 200));
    pdfButton.setColorForeground(color(0, 200, 200, 30));                        // colour when mouse is overtop of item
    pdfButton.setColorActive(color(0, 200, 200, 70));                            // colour when item is clicked
    pdfButton.setColorCaptionLabel(color(0));                                    // text colour
    
  } // constructor
  
  // ---------------------------------------
  // draw
  // ---------------------------------------
  void draw() {
    
    pdfButton.show();
    
  } // draw
  
  
  
} // PDFUI
